home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / mfinputs / logo / mf
Encoding:
Text File  |  1988-02-26  |  2.6 KB  |  97 lines

  1. % This is LOGO.MF in text format, as of Mar 31, 1986.
  2. % Routines for the METAFONT logo, as found in The METAFONTbook
  3. % (logo10.mf is a typical parameter file)
  4.  
  5. mode_setup;
  6. if unknown slant: slant:=0 else: currenttransform:=
  7.  identity slanted slant yscaled aspect_ratio fi;
  8.  
  9. ygap#:=(ht#/13.5u#)*xgap#;              % vertical adjustment
  10. ho#:=o#;                                % horizontal overshoot
  11. leftstemloc#:=2.5u#+s#;                 % position of left stem
  12. barheight#:=.45ht#;                     % height of bar lines
  13. py#:=.9px#;                             % vertical pen thickness
  14.  
  15. define_pixels(s,u);
  16. define_whole_pixels(xgap);
  17. define_whole_vertical_pixels(ygap);
  18. define_blacker_pixels(px,py);
  19. pickup pencircle xscaled px yscaled py;
  20. logo_pen:=savepen;
  21. define_good_x_pixels(leftstemloc);
  22. define_good_y_pixels(barheight);
  23. define_corrected_pixels(o);
  24. define_horizontal_corrected_pixels(ho);
  25.  
  26. def beginlogochar(expr code, unit_width) =
  27.  beginchar(code,unit_width*u#+2s#,ht#,0);
  28.  pickup logo_pen enddef;
  29.  
  30. def super_half(suffix i,j,k) =
  31.  draw z.i{0,y.j-y.i}
  32.  ... (.8[x.j,x.i],.8[y.i,y.j]){z.j-z.i}
  33.  ... z.j{x.k-x.i,0}
  34.  ... (.8[x.j,x.k],.8[y.k,y.j]){z.k-z.j}
  35.  ... z.k{0,y.k-y.j} enddef;
  36.  
  37. beginlogochar("M",18);
  38. x1=x2=leftstemloc; x4=x5=w-x1; x3=w-x3;
  39. y1=y5; y2=y4; bot y1=-o;
  40. top y2=h+o; y3=y1+ygap;
  41. draw z1--z2--z3--z4--z5;
  42. labels(1,2,3,4,5); endchar;
  43.  
  44. beginlogochar("E",14);
  45. x1=x2=x3=leftstemloc;
  46. x4=x6=w-x1+ho; x5=x4-xgap;
  47. y1=y6; y2=y5; y3=y4;
  48. bot y1=0; top y3=h; y2=barheight;
  49. draw z6--z1--z3--z4; draw z2--z5;
  50. labels(1,2,3,4,5,6); endchar;
  51.  
  52. beginlogochar("T",13);
  53. italcorr ht#*slant + .5u#;
  54. if .5w<>good.x .5w: change_width; fi
  55. lft x1=-eps; x2=w-x1; x3=x4=.5w;
  56. y1=y2=y3; top y1=h; bot y4=-o;
  57. draw z1--z2; draw z3--z4;
  58. labels(1,2,3,4); endchar;
  59.  
  60. beginlogochar("A",15);
  61. x1=.5w; x2=x4=leftstemloc; x3=x5=w-x2;
  62. top y1=h+o; y2=y3=barheight;
  63. bot y4=bot y5=-o;
  64. draw z4--z2--z3--z5; super_half(2,1,3);
  65. labels(1,2,3,4,5); endchar;
  66.  
  67. beginlogochar("F",14);
  68. x1=x2=x3=leftstemloc;
  69. x4=w-x1+ho; x5=x4-xgap;
  70. y2=y5; y3=y4; bot y1=-o;
  71. top y3=h; y2=barheight;
  72. draw z1--z3--z4; draw z2--z5;
  73. labels(1,2,3,4,5); endchar;
  74.  
  75. beginlogochar("O",15);
  76. x1=x4=.5w; top y1=h+o; bot y4=-o;
  77. x2=w-x3=good.x(1.5u+s); y2=y3=barheight;
  78. super_half(2,1,3); super_half(2,4,3);
  79. labels(1,2,3,4); endchar;
  80.  
  81. beginlogochar("N",15);
  82. x1=x2=leftstemloc; x3=x4=x5=w-x1;
  83. bot y1=bot y4=-o;
  84. top y2=top y5=h+o; y3=y4+ygap;
  85. draw z1--z2--z3; draw z4--z5;
  86. labels(1,2,3,4,5); endchar;
  87.  
  88. ligtable "T": "A" kern -.5u#;
  89. ligtable "F": "O" kern -u#;
  90.  
  91. font_quad:=18u#+2s#;
  92. font_normal_space:=6u#+2s#;
  93. font_normal_stretch:=3u#;
  94. font_normal_shrink:=2u#;
  95. font_identifier:="MFLOGO" if slant<>0: & "SL" fi;
  96. font_coding_scheme:="AEFMNOT only";
  97.